@import './variable';

$curTheme: default;

@mixin useTheme() {
    @each $key, $value in $themes {
        $curTheme: $key !global;

        [data-theme='#{$key}'] & {
            @content;
        }
    }
}

@function getVar($key) {
    $themeMap: map-get($themes, $curTheme);
    @return map-get($themeMap, $key);
}